package edu.sandau.basic.mapper;

import edu.sandau.basic.domain.Role;
import edu.sandau.basic.domain.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserRoleMapper {
    List<Role> selectRolesByUserId(Integer userId);
    void deleteUserRoles(Integer userId);
    void insertUserRoles(@Param("userId") Integer userId, @Param("roleIds") List<Integer> roleIds);
    List<User> selectUsersByRoleId(Integer roleId);
}
